<?php

namespace Home\Model;
use Think\Model;
class DataModel extends Model {
    protected $_validate=array(
      array('username','require','用户名必须输入！'),
      array('message','require','留言内容必须输入！'),
    );
    protected $_auto=   array(
      array('m_date','getTime',1,'callback'),
      );
    protected function getTime()
    {  
        return date("Y-m-d h:i:s");
    }
}

